import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../components/Index'
import Info_v from '../components/Info_v'

Vue.use(VueRouter)

const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return routerPush.call(this, location).catch(error => error)
}


const routes = [
    {
        path: "/",
        redirect: "/index"
    },
    {
        path: "/index",
        component: Index
    },
    {
        path: "/info_v",
        component: Info_v
    },
]

const router = new VueRouter({
    routes
})

export default router